/**
 * 
 */
package com.pxingg.utils;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

/**
 * @author pxingg
 * 
 */
public class RangeUtilsTest extends RangeUtils
{
    /**
     * The log of this class
     */
    static Log log = LogFactory.getLog(RangeUtilsTest.class);

    /**
     * @throws java.lang.Exception
     */
    @BeforeClass
    public static void setUpBeforeClass() throws Exception
    {
    }

    /**
     * @throws java.lang.Exception
     */
    @AfterClass
    public static void tearDownAfterClass() throws Exception
    {
    }

    /**
     * @throws java.lang.Exception
     */
    @Before
    public void setUp() throws Exception
    {
    }

    /**
     * @throws java.lang.Exception
     */
    @After
    public void tearDown() throws Exception
    {
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isBeyondLORO(byte, byte, byte)}.
     */
    @Test
    public final void testIsBeyondLOROByteByteByte()
    {
        Assert.assertTrue(RangeUtils.isBeyondLORO((byte) 0x3, (byte)0x6, (byte)0x2));
        Assert.assertTrue(RangeUtils.isBeyondLORO((byte) 0x3, (byte)0x6, (byte)0x3));
        Assert.assertTrue(RangeUtils.isBeyondLORO((byte) 0x3, (byte)0x6, (byte)0x6));
        Assert.assertTrue(RangeUtils.isBeyondLORO((byte) 0x3, (byte)0x6, (byte)0x7));
        Assert.assertFalse(RangeUtils.isBeyondLORO((byte) 0x3, (byte)0x6, (byte)0x5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isBeyondLORO(double, double, double)}.
     */
    @Test
    public final void testIsBeyondLORODoubleDoubleDouble()
    {
        Assert.assertTrue(RangeUtils.isBeyondLORO(0.3, 0.6, 0.2));
        Assert.assertTrue(RangeUtils.isBeyondLORO(0.3, 0.6, 0.3));
        Assert.assertTrue(RangeUtils.isBeyondLORO(0.3, 0.6, 0.6));
        Assert.assertTrue(RangeUtils.isBeyondLORO(0.3, 0.6, 0.7));
        Assert.assertFalse(RangeUtils.isBeyondLORO(0.3, 0.6, 0.5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isBeyondLORO(int, int, int)}.
     */
    @Test
    public final void testIsBeyondLOROIntIntInt()
    {
        Assert.assertTrue(RangeUtils.isBeyondLORO(3, 6, 2));
        Assert.assertTrue(RangeUtils.isBeyondLORO(3, 6, 3));
        Assert.assertTrue(RangeUtils.isBeyondLORO(3, 6, 6));
        Assert.assertTrue(RangeUtils.isBeyondLORO(3, 6, 7));
        Assert.assertFalse(RangeUtils.isBeyondLORO(3, 6, 5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isBeyondLORO(long, long, long)}.
     */
    @Test
    public final void testIsBeyondLOROLongLongLong()
    {
        Assert.assertTrue(RangeUtils.isBeyondLORO(3l, 6l, 2l));
        Assert.assertTrue(RangeUtils.isBeyondLORO(3l, 6l, 3l));
        Assert.assertTrue(RangeUtils.isBeyondLORO(3l, 6l, 6l));
        Assert.assertTrue(RangeUtils.isBeyondLORO(3l, 6l, 7l));
        Assert.assertFalse(RangeUtils.isBeyondLORO(3l, 6l, 5l));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isBeyondLORP(byte, byte, byte)}.
     */
    @Test
    public final void testIsBeyondLORPByteByteByte()
    {
        Assert.assertTrue(RangeUtils.isBeyondLORP((byte) 0x3, (byte)0x6, (byte)0x2));
        Assert.assertTrue(RangeUtils.isBeyondLORP((byte) 0x3, (byte)0x6, (byte)0x3));
        Assert.assertFalse(RangeUtils.isBeyondLORP((byte) 0x3, (byte)0x6, (byte)0x6));
        Assert.assertTrue(RangeUtils.isBeyondLORP((byte) 0x3, (byte)0x6, (byte)0x7));
        Assert.assertFalse(RangeUtils.isBeyondLORP((byte) 0x3, (byte)0x6, (byte)0x5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isBeyondLORP(double, double, double)}.
     */
    @Test
    public final void testIsBeyondLORPDoubleDoubleDouble()
    {
        Assert.assertTrue(RangeUtils.isBeyondLORP(0.3, 0.6, 0.2));
        Assert.assertTrue(RangeUtils.isBeyondLORP(0.3, 0.6, 0.3));
        Assert.assertFalse(RangeUtils.isBeyondLORP(0.3, 0.6, 0.6));
        Assert.assertTrue(RangeUtils.isBeyondLORP(0.3, 0.6, 0.7));
        Assert.assertFalse(RangeUtils.isBeyondLORP(0.3, 0.6, 0.5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isBeyondLORP(int, int, int)}.
     */
    @Test
    public final void testIsBeyondLORPIntIntInt()
    {
        Assert.assertTrue(RangeUtils.isBeyondLORP(3, 6, 2));
        Assert.assertTrue(RangeUtils.isBeyondLORP(3, 6, 3));
        Assert.assertFalse(RangeUtils.isBeyondLORP(3, 6, 6));
        Assert.assertTrue(RangeUtils.isBeyondLORP(3, 6, 7));
        Assert.assertFalse(RangeUtils.isBeyondLORP(3, 6, 5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isBeyondLORP(long, long, long)}.
     */
    @Test
    public final void testIsBeyondLORPLongLongLong()
    {
        Assert.assertTrue(RangeUtils.isBeyondLORP(3l, 6l, 2l));
        Assert.assertTrue(RangeUtils.isBeyondLORP(3l, 6l, 3l));
        Assert.assertFalse(RangeUtils.isBeyondLORP(3l, 6l, 6l));
        Assert.assertTrue(RangeUtils.isBeyondLORP(3l, 6l, 7l));
        Assert.assertFalse(RangeUtils.isBeyondLORP(3l, 6l, 5l));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isBeyondLPRO(byte, byte, byte)}.
     */
    @Test
    public final void testIsBeyondLPROByteByteByte()
    {
        Assert.assertTrue(RangeUtils.isBeyondLPRO((byte) 0x3, (byte)0x6, (byte)0x2));
        Assert.assertFalse(RangeUtils.isBeyondLPRO((byte) 0x3, (byte)0x6, (byte)0x3));
        Assert.assertTrue(RangeUtils.isBeyondLPRO((byte) 0x3, (byte)0x6, (byte)0x6));
        Assert.assertTrue(RangeUtils.isBeyondLPRO((byte) 0x3, (byte)0x6, (byte)0x7));
        Assert.assertFalse(RangeUtils.isBeyondLPRO((byte) 0x3, (byte)0x6, (byte)0x5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isBeyondLPRO(double, double, double)}.
     */
    @Test
    public final void testIsBeyondLPRODoubleDoubleDouble()
    {
        Assert.assertTrue(RangeUtils.isBeyondLPRO(0.3, 0.6, 0.2));
        Assert.assertFalse(RangeUtils.isBeyondLPRO(0.3, 0.6, 0.3));
        Assert.assertTrue(RangeUtils.isBeyondLPRO(0.3, 0.6, 0.6));
        Assert.assertTrue(RangeUtils.isBeyondLPRO(0.3, 0.6, 0.7));
        Assert.assertFalse(RangeUtils.isBeyondLPRO(0.3, 0.6, 0.5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isBeyondLPRO(int, int, int)}.
     */
    @Test
    public final void testIsBeyondLPROIntIntInt()
    {
        Assert.assertTrue(RangeUtils.isBeyondLPRO(3, 6, 2));
        Assert.assertFalse(RangeUtils.isBeyondLPRO(3, 6, 3));
        Assert.assertTrue(RangeUtils.isBeyondLPRO(3, 6, 6));
        Assert.assertTrue(RangeUtils.isBeyondLPRO(3, 6, 7));
        Assert.assertFalse(RangeUtils.isBeyondLPRO(3, 6, 5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isBeyondLPRO(long, long, long)}.
     */
    @Test
    public final void testIsBeyondLPROLongLongLong()
    {
        Assert.assertTrue(RangeUtils.isBeyondLPRO(3l, 6l, 2l));
        Assert.assertFalse(RangeUtils.isBeyondLPRO(3l, 6l, 3l));
        Assert.assertTrue(RangeUtils.isBeyondLPRO(3l, 6l, 6l));
        Assert.assertTrue(RangeUtils.isBeyondLPRO(3l, 6l, 7l));
        Assert.assertFalse(RangeUtils.isBeyondLPRO(3l, 6l, 5l));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isBeyondLPRP(byte, byte, byte)}.
     */
    @Test
    public final void testIsBeyondLPRPByteByteByte()
    {
        Assert.assertTrue(RangeUtils.isBeyondLPRP((byte) 0x3, (byte)0x6, (byte)0x2));
        Assert.assertFalse(RangeUtils.isBeyondLPRP((byte) 0x3, (byte)0x6, (byte)0x3));
        Assert.assertFalse(RangeUtils.isBeyondLPRP((byte) 0x3, (byte)0x6, (byte)0x6));
        Assert.assertTrue(RangeUtils.isBeyondLPRP((byte) 0x3, (byte)0x6, (byte)0x7));
        Assert.assertFalse(RangeUtils.isBeyondLPRP((byte) 0x3, (byte)0x6, (byte)0x5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isBeyondLPRP(double, double, double)}.
     */
    @Test
    public final void testIsBeyondLPRPDoubleDoubleDouble()
    {
        Assert.assertTrue(RangeUtils.isBeyondLPRP(0.3, 0.6, 0.2));
        Assert.assertFalse(RangeUtils.isBeyondLPRP(0.3, 0.6, 0.3));
        Assert.assertFalse(RangeUtils.isBeyondLPRP(0.3, 0.6, 0.6));
        Assert.assertTrue(RangeUtils.isBeyondLPRP(0.3, 0.6, 0.7));
        Assert.assertFalse(RangeUtils.isBeyondLPRP(0.3, 0.6, 0.5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isBeyondLPRP(int, int, int)}.
     */
    @Test
    public final void testIsBeyondLPRPIntIntInt()
    {
        Assert.assertTrue(RangeUtils.isBeyondLPRP(3, 6, 2));
        Assert.assertFalse(RangeUtils.isBeyondLPRP(3, 6, 3));
        Assert.assertFalse(RangeUtils.isBeyondLPRP(3, 6, 6));
        Assert.assertTrue(RangeUtils.isBeyondLPRP(3, 6, 7));
        Assert.assertFalse(RangeUtils.isBeyondLPRP(3, 6, 5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isBeyondLPRP(long, long, long)}.
     */
    @Test
    public final void testIsBeyondLPRPLongLongLong()
    {
        Assert.assertTrue(RangeUtils.isBeyondLPRP(3l, 6l, 2l));
        Assert.assertFalse(RangeUtils.isBeyondLPRP(3l, 6l, 3l));
        Assert.assertFalse(RangeUtils.isBeyondLPRP(3l, 6l, 6l));
        Assert.assertTrue(RangeUtils.isBeyondLPRP(3l, 6l, 7l));
        Assert.assertFalse(RangeUtils.isBeyondLPRP(3l, 6l, 5l));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isInRangeLORO(byte, byte, byte)}.
     */
    @Test
    public final void testIsInRangeLOROByteByteByte()
    {
        Assert.assertFalse(RangeUtils.isInRangeLORO((byte) 0x3, (byte)0x6, (byte)0x2));
        Assert.assertFalse(RangeUtils.isInRangeLORO((byte) 0x3, (byte)0x6, (byte)0x3));
        Assert.assertFalse(RangeUtils.isInRangeLORO((byte) 0x3, (byte)0x6, (byte)0x6));
        Assert.assertFalse(RangeUtils.isInRangeLORO((byte) 0x3, (byte)0x6, (byte)0x7));
        Assert.assertTrue(RangeUtils.isInRangeLORO((byte) 0x3, (byte)0x6, (byte)0x5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isInRangeLORO(double, double, double)}.
     */
    @Test
    public final void testIsInRangeLORODoubleDoubleDouble()
    {
        Assert.assertFalse(RangeUtils.isInRangeLORO(0.3, 0.6, 0.2));
        Assert.assertFalse(RangeUtils.isInRangeLORO(0.3, 0.6, 0.3));
        Assert.assertFalse(RangeUtils.isInRangeLORO(0.3, 0.6, 0.6));
        Assert.assertFalse(RangeUtils.isInRangeLORO(0.3, 0.6, 0.7));
        Assert.assertTrue(RangeUtils.isInRangeLORO(0.3, 0.6, 0.5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isInRangeLORO(int, int, int)}.
     */
    @Test
    public final void testIsInRangeLOROIntIntInt()
    {
        Assert.assertFalse(RangeUtils.isInRangeLORO(3, 6, 2));
        Assert.assertFalse(RangeUtils.isInRangeLORO(3, 6, 3));
        Assert.assertFalse(RangeUtils.isInRangeLORO(3, 6, 6));
        Assert.assertFalse(RangeUtils.isInRangeLORO(3, 6, 7));
        Assert.assertTrue(RangeUtils.isInRangeLORO(3, 6, 5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isInRangeLORO(long, long, long)}.
     */
    @Test
    public final void testIsInRangeLOROLongLongLong()
    {
        Assert.assertFalse(RangeUtils.isInRangeLORO(3l, 6l, 2l));
        Assert.assertFalse(RangeUtils.isInRangeLORO(3l, 6l, 3l));
        Assert.assertFalse(RangeUtils.isInRangeLORO(3l, 6l, 6l));
        Assert.assertFalse(RangeUtils.isInRangeLORO(3l, 6l, 7l));
        Assert.assertTrue(RangeUtils.isInRangeLORO(3l, 6l, 5l));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isInRangeLORP(byte, byte, byte)}.
     */
    @Test
    public final void testIsInRangeLORPByteByteByte()
    {
        Assert.assertFalse(RangeUtils.isInRangeLORP((byte) 0x3, (byte)0x6, (byte)0x2));
        Assert.assertFalse(RangeUtils.isInRangeLORP((byte) 0x3, (byte)0x6, (byte)0x3));
        Assert.assertTrue(RangeUtils.isInRangeLORP((byte) 0x3, (byte)0x6, (byte)0x6));
        Assert.assertFalse(RangeUtils.isInRangeLORP((byte) 0x3, (byte)0x6, (byte)0x7));
        Assert.assertTrue(RangeUtils.isInRangeLORP((byte) 0x3, (byte)0x6, (byte)0x5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isInRangeLORP(double, double, double)}.
     */
    @Test
    public final void testIsInRangeLORPDoubleDoubleDouble()
    {
        Assert.assertFalse(RangeUtils.isInRangeLORP(0.3, 0.6, 0.2));
        Assert.assertFalse(RangeUtils.isInRangeLORP(0.3, 0.6, 0.3));
        Assert.assertTrue(RangeUtils.isInRangeLORP(0.3, 0.6, 0.6));
        Assert.assertFalse(RangeUtils.isInRangeLORP(0.3, 0.6, 0.7));
        Assert.assertTrue(RangeUtils.isInRangeLORP(0.3, 0.6, 0.5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isInRangeLORP(int, int, int)}.
     */
    @Test
    public final void testIsInRangeLORPIntIntInt()
    {
        Assert.assertFalse(RangeUtils.isInRangeLORP(3, 6, 2));
        Assert.assertFalse(RangeUtils.isInRangeLORP(3, 6, 3));
        Assert.assertTrue(RangeUtils.isInRangeLORP(3, 6, 6));
        Assert.assertFalse(RangeUtils.isInRangeLORP(3, 6, 7));
        Assert.assertTrue(RangeUtils.isInRangeLORP(3, 6, 5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isInRangeLORP(long, long, long)}.
     */
    @Test
    public final void testIsInRangeLORPLongLongLong()
    {
        Assert.assertFalse(RangeUtils.isInRangeLORP(3l, 6l, 2l));
        Assert.assertFalse(RangeUtils.isInRangeLORP(3l, 6l, 3l));
        Assert.assertTrue(RangeUtils.isInRangeLORP(3l, 6l, 6l));
        Assert.assertFalse(RangeUtils.isInRangeLORP(3l, 6l, 7l));
        Assert.assertTrue(RangeUtils.isInRangeLORP(3l, 6l, 5l));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isInRangeLPRO(byte, byte, byte)}.
     */
    @Test
    public final void testIsInRangeLPROByteByteByte()
    {
        Assert.assertFalse(RangeUtils.isInRangeLPRO((byte) 0x3, (byte)0x6, (byte)0x2));
        Assert.assertTrue(RangeUtils.isInRangeLPRO((byte) 0x3, (byte)0x6, (byte)0x3));
        Assert.assertFalse(RangeUtils.isInRangeLPRO((byte) 0x3, (byte)0x6, (byte)0x6));
        Assert.assertFalse(RangeUtils.isInRangeLPRO((byte) 0x3, (byte)0x6, (byte)0x7));
        Assert.assertTrue(RangeUtils.isInRangeLPRO((byte) 0x3, (byte)0x6, (byte)0x5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isInRangeLPRO(double, double, double)}.
     */
    @Test
    public final void testIsInRangeLPRODoubleDoubleDouble()
    {
        Assert.assertFalse(RangeUtils.isInRangeLPRO(0.3, 0.6, 0.2));
        Assert.assertTrue(RangeUtils.isInRangeLPRO(0.3, 0.6, 0.3));
        Assert.assertFalse(RangeUtils.isInRangeLPRO(0.3, 0.6, 0.6));
        Assert.assertFalse(RangeUtils.isInRangeLPRO(0.3, 0.6, 0.7));
        Assert.assertTrue(RangeUtils.isInRangeLPRO(0.3, 0.6, 0.5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isInRangeLPRO(int, int, int)}.
     */
    @Test
    public final void testIsInRangeLPROIntIntInt()
    {
        Assert.assertFalse(RangeUtils.isInRangeLPRO(3, 6, 2));
        Assert.assertTrue(RangeUtils.isInRangeLPRO(3, 6, 3));
        Assert.assertFalse(RangeUtils.isInRangeLPRO(3, 6, 6));
        Assert.assertFalse(RangeUtils.isInRangeLPRO(3, 6, 7));
        Assert.assertTrue(RangeUtils.isInRangeLPRO(3, 6, 5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isInRangeLPRO(long, long, long)}.
     */
    @Test
    public final void testIsInRangeLPROLongLongLong()
    {
        Assert.assertFalse(RangeUtils.isInRangeLPRO(3l, 6l, 2l));
        Assert.assertTrue(RangeUtils.isInRangeLPRO(3l, 6l, 3l));
        Assert.assertFalse(RangeUtils.isInRangeLPRO(3l, 6l, 6l));
        Assert.assertFalse(RangeUtils.isInRangeLPRO(3l, 6l, 7l));
        Assert.assertTrue(RangeUtils.isInRangeLPRO(3l, 6l, 5l));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isInRangeLPRP(byte, byte, byte)}.
     */
    @Test
    public final void testIsInRangeLPRPByteByteByte()
    {
        Assert.assertFalse(RangeUtils.isInRangeLPRP((byte) 0x3, (byte)0x6, (byte)0x2));
        Assert.assertTrue(RangeUtils.isInRangeLPRP((byte) 0x3, (byte)0x6, (byte)0x3));
        Assert.assertTrue(RangeUtils.isInRangeLPRP((byte) 0x3, (byte)0x6, (byte)0x6));
        Assert.assertFalse(RangeUtils.isInRangeLPRP((byte) 0x3, (byte)0x6, (byte)0x7));
        Assert.assertTrue(RangeUtils.isInRangeLPRP((byte) 0x3, (byte)0x6, (byte)0x5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isInRangeLPRP(double, double, double)}.
     */
    @Test
    public final void testIsInRangeLPRPDoubleDoubleDouble()
    {
        Assert.assertFalse(RangeUtils.isInRangeLPRP(0.3, 0.6, 0.2));
        Assert.assertTrue(RangeUtils.isInRangeLPRP(0.3, 0.6, 0.3));
        Assert.assertTrue(RangeUtils.isInRangeLPRP(0.3, 0.6, 0.6));
        Assert.assertFalse(RangeUtils.isInRangeLPRP(0.3, 0.6, 0.7));
        Assert.assertTrue(RangeUtils.isInRangeLPRP(0.3, 0.6, 0.5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isInRangeLPRP(int, int, int)}.
     */
    @Test
    public final void testIsInRangeLPRPIntIntInt()
    {
        Assert.assertFalse(RangeUtils.isInRangeLPRP(3, 6, 2));
        Assert.assertTrue(RangeUtils.isInRangeLPRP(3, 6, 3));
        Assert.assertTrue(RangeUtils.isInRangeLPRP(3, 6, 6));
        Assert.assertFalse(RangeUtils.isInRangeLPRP(3, 6, 7));
        Assert.assertTrue(RangeUtils.isInRangeLPRP(3, 6, 5));
    }

    /**
     * Test method for {@link com.pxing.utils.RangeUtils#isInRangeLPRP(long, long, long)}.
     */
    @Test
    public final void testIsInRangeLPRPLongLongLong()
    {
        Assert.assertFalse(RangeUtils.isInRangeLPRP(3l, 6l, 2l));
        Assert.assertTrue(RangeUtils.isInRangeLPRP(3l, 6l, 3l));
        Assert.assertTrue(RangeUtils.isInRangeLPRP(3l, 6l, 6l));
        Assert.assertFalse(RangeUtils.isInRangeLPRP(3l, 6l, 7l));
        Assert.assertTrue(RangeUtils.isInRangeLPRP(3l, 6l, 5l));
    }
}
